package at.fhooe.engine.event.events;

import at.fhooe.engine.event.EventListener;

public class MapObjectCreatedEvent extends Event{

	public static final String TYPE = "MapObjectCreated";
	private String m_mapObjectId;
	private String m_mapObjectName;
	private double m_positionX;
	private double m_positionY;
	private double m_size;
	
	public MapObjectCreatedEvent(String mapObjectId, String mapObjectName, double posX, double posY, double size) {
		super(TYPE);
		m_mapObjectId = mapObjectId;
		m_mapObjectName = mapObjectName;
		m_positionX = posX;
		m_positionY = posY;
		m_size = size;
	}

	@Override
	public void processEvent(EventListener eventListener) {
		((Listener) eventListener).onMapObjectCreatedEvent(this);		
	}
	
	//embedded listener interface with the specific function call
	public interface Listener extends EventListener {
		public void onMapObjectCreatedEvent(MapObjectCreatedEvent mapObjectCreatedEvent);
	}

	public String getMapObjectId() {
		return m_mapObjectId;
	}

	public String getMapObjectName() {
		return m_mapObjectName;
	}

	public double getPositionX() {
		return m_positionX;
	}

	public double getPositionY() {
		return m_positionY;
	}

	public double getSize() {
		return m_size;
	}
	
	
}
